/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Memento2;

/**
 *
 * @author lcc
 */
public class Originator {

    private String state;

    public class Memento {

        private String state;

        public Memento(String stateToSave) {
            state = stateToSave;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }
    }

    public void setState(String state) {
        this.state = state;
    }

    public Memento createMemento() {
        return new Memento(state); 
    }
    
    public void setMemento(Memento m) {
        state = m.state;
    }

    public String getState() {
        return state;
    }
    
    
}
